<template>
	<view class="container">
		<view
			class="header-box"
			:style="{
				height: winInfo.height + 'px',
				paddingTop: winInfo.top + 'px',
				linheight: winInfo.height + 'px',
				justifyContent: winInfo.hostName != 'WeChat' ? 'space-between' : 'flex-start'
			}"
		>
			<view class="header-info">
				<tui-icon name="arrowleft" @tap="goBack" color="#333333" size="25" bold="true"></tui-icon>
				<view class="header-name">
					{{ companyInfo.GongsiM }}
				</view>
			</view>
			<!-- v-if="winInfo.hostName != 'WeChat'" -->
			<view class="header-btn">
				<!-- <image src="/static/images/company/more.png" @tap="topBubble"></image> -->
				<view class="header-btn-box" @tap="scCompany">
					<image :src="companyInfo.shoucang ? '/static/images/company/yiSC.png' : '/static/images/company/shoucang.png'"></image>
					<!-- <view class="">收藏</view> -->
				</view>
				<view class="header-btn-box" @tap="caozuoShow()">
					<image src="/static/images/company/zhuanfa.png"></image>
					<!-- <view class="">转发</view> -->
				</view>
				<tui-bubble-popup
					:show="moreBtn"
					:mask="false"
					position="absolute"
					direction="top"
					@close="topBubble"
					width="200rpx"
					left="-65rpx"
					bottom="-170rpx"
					translateY="100"
					translateX="100"
					triangleRight="100rpx"
					triangleTop="-22rpx"
					backgroundColor="#fff"
				>
					<view class="header-btn header-btn-box" @tap="scCompany">
						<image :src="companyInfo.shoucang ? '/static/images/company/yiSC.png' : '/static/images/company/shoucang.png'"></image>
						<view class="">收藏</view>
					</view>
					<view class="header-btn header-btn-box" @tap="caozuoShow()">
						<image src="/static/images/company/zhuanfa.png"></image>
						<view class="">转发</view>
					</view>
				</tui-bubble-popup>
			</view>
			<!-- <image
				v-else
				style="width: 30rpx"
				mode="widthFix"
				@tap="scCompany"
				:src="companyInfo.shoucang ? '/static/images/company/yiSC.png' : '/static/images/company/shoucang.png'"
			></image> -->
		</view>
		<view class="hearder-container">
			<view class="company-info">
				<image
					:src="Microi.FileServer + companyInfo.GongsiLOGO"
					v-if="companyInfo.GongsiLOGO"
					@tap="previewImage(companyInfo.GongsiLOGO ? Microi.FileServer + companyInfo.GongsiLOGO : '')"
					mode="aspectFill"
					class="company-image"
				></image>
				<view class="no-GongSiLogo" v-else>
					<view
						style="
							display: -webkit-box;
							-webkit-box-orient: vertical;
							-webkit-line-clamp: 1;
							width: 80%;
							overflow: hidden;
							text-overflow: ellipsis;
							word-wrap: break-word;
						"
					>
						{{ companyInfo.Jiancheng || companyInfo.GongsiM }}
					</view>
				</view>
				<view class="company-title">
					<view class="company-name">
						{{ companyInfo.GongsiM }}
					</view>
					<hbxw-text-folding v-if="companyInfo.GongsiMS" :rows="2" :fontSize="24" :btnStyle="{ backgroundColor: 'transparent', color: '#999' }">
						{{ companyInfo.GongsiMS }}
					</hbxw-text-folding>
					<!-- <view class="company-MS" :style="{ '-webkit-line-clamp': companyInfo.Zhankai ? 1000 : 2 }">
						{{ companyInfo.GongsiMS }}
					</view> -->
					<!-- <view class="zhankai" v-if="!companyInfo.Zhankai && companyInfo.GongsiMS.length > 50" @tap="companyInfo.Zhankai = 1">
						<view>展开</view>
						<image src="/static/images/common/down.svg" mode=""></image>
					</view> -->
					<view class="zhankai" v-else-if="companyInfo.GongsiMS && companyInfo.GongsiMS.length > 50" @tap="companyInfo.Zhankai = 0">
						<view>收起</view>
						<image src="/static/images/common/down.svg" mode="" :style="{ transform: 'rotate(180deg)' }"></image>
					</view>
					<view class="company-BQcontainer" v-if="companyInfo.GongsiBQ">
						<view class="company-BQ" v-for="item in JSON.parse(companyInfo.GongsiBQ)">
							{{ item.Value }}
						</view>
					</view>
				</view>
			</view>
			<view class="count-container">
				<view class="count-box">
					<view>
						{{ companyInfo.GangPingCount || 0 }}
					</view>
					<view class="count-title">岗位评价</view>
				</view>
				<view class="count-box">
					<view>
						{{ companyInfo.MianjiCount || 0 }}
					</view>
					<view class="count-title">面试经验</view>
				</view>
				<view class="count-box">
					<view>
						{{ companyInfo.GangweiCount || 0 }}
					</view>
					<view class="count-title">热招岗位</view>
				</view>
			</view>
		</view>
		<!-- 薪资待遇 -->
		<view class="Xinzi-container" v-if="companyInfo.XinziList && companyInfo.XinziList.length">
			<view class="Xinzi-header">
				<view class="xinzi-title">薪资待遇</view>
				<view class="right-box" @tap="moreGWData">更多</view>
			</view>
			<view class="xinziInfo-container">
				<view class="xinzi-box" v-for="item in companyInfo.XinziList">
					<view class="xinziinfo-header">
						<view class="xinzi-BT">
							{{ item.GangweiM }}
						</view>
						<view class="right-box" style="font-size: 24rpx">{{ item.peopleCount }}人上传</view>
					</view>
					<view style="margin-top: 20rpx" class="Line-info">薪资:{{ item.LowXinzi * 1000 }}~{{ item.MaxXinzi * 1000 }}</view>
					<view class="Line-info">工作年限:{{ item.MinNianFenJianGe }}~{{ item.MaxNianFenJianGe }}年</view>
				</view>
			</view>
		</view>
		<view class="Xinzi-header">
			<tui-tabs
				width="200"
				:tabs="tabsName"
				sliderWidth="50"
				sliderHeight="8"
				:currentTab="currentTab"
				itemWidth="50%"
				sliderBgColor="#FB353B"
				selectedColor="#FB353B"
				@change="changeTab"
			></tui-tabs>
			<view class="right-box" @tap="addInfo">添加</view>
		</view>
		<view class="search-container">
			<view class="search-box">
				<image src="/static/images/company/search.svg"></image>
				<input style="width: 100%" type="text" v-model="searchKey" placeholder="搜索内容" placeholder-class="search-holder" />
			</view>
			<view class="search-btn" @tap="search">搜索</view>
		</view>
		<view class="paixu-Container">
			<view class="paixu-box" v-for="(item, index) in tabs[currentTab].paixuArray" @tap="changePaixu(index)">
				<view>
					{{ item.name }}
				</view>
				<image :src="`/static/images/company/sort${item.sort}.png`" mode="widthFix"></image>
			</view>
		</view>
		<view v-if="currentTab == 0">
			<view
				class="Wenzhang-box"
				v-for="(item, index) in tabs[currentTab].Data"
				v-if="tabs[currentTab].Data.length"
				:style="{ backgroundColor: isGray && options.WenZhangID == item.Id && !options.Type ? '#f4f5f6' : '#fff' }"
			>
				<view class="user-header">
					<image src="/static/images/company/niming.png" mode="aspectFill" class="avatar-img"></image>
					<view class="user-name">{{ item.GangweiM }}</view>
					<view>匿名用户</view>
					<image src="/static/images/company/more.png" @tap="caozuoShow(index)" mode="widthFix" style="width: 25rpx"></image>
				</view>
				<view class="wenzhang-info" :style="{ height: item.Zhankai ? 'auto' : '56rpx' }">
					<view class="wenzhang-Line-info" style="display: flex; gap: 15rpx">
						<view style="white-space: nowrap">工作时长：{{ item.GongzuoSC }}</view>
						<view style="white-space: nowrap">工作强度：{{ item.GongzuoQD }}</view>
						<view style="white-space: nowrap">成长性：{{ item.GongzuoCCX }}</view>
					</view>
					<view class="wenzhang-Line-info">
						<view>工作时间</view>
						<view>{{ item.GongzuoSJ }}</view>
					</view>
					<view class="wenzhang-Line-info">
						<view>工作内容</view>
						<view>{{ item.GongzuoNR }}</view>
					</view>
					<view class="wenzhang-Line-info">
						<view>工作氛围</view>
						<view>{{ item.GongzuoFW }}</view>
					</view>
				</view>
				<view class="wenzhang-buttom">
					<view class="wenzhang-time">{{ item.CreateTime.split(' ')[0] }}</view>
					<view class="wenzhang-right-box">
						<view class="buttom-box" @tap="Dianzan(index, item.Id, item.myDZ)">
							<image :src="item.myDZ ? '/static/images/company/hongxin.png' : '/static/images/company/xin.png'" mode=""></image>
							<view :style="{ color: item.myDZ ? '#FA1B0A' : '#666666' }">{{ item.dianzanCount || '' }}</view>
						</view>
						<view class="buttom-box" @tap="showPinglun(item.Id, index)">
							<image src="/static/images/company/pinglun.png" mode=""></image>
							<view>{{ item.pinglunCount || '' }}</view>
						</view>
						<view class="zhankai" v-if="!item.Zhankai" @tap="item.Zhankai = 1">
							<view>展开</view>
							<image src="/static/images/common/down.svg" mode=""></image>
						</view>
						<view class="zhankai" v-else @tap="item.Zhankai = 0">
							<view>收起</view>
							<image src="/static/images/common/down.svg" mode="" :style="{ transform: 'rotate(180deg)' }"></image>
						</view>
					</view>
				</view>
			</view>
			<view v-else class="no-Data">
				<image src="/static/images/my/noData.png" mode="widthFix"></image>
				<view class="">暂无数据</view>
			</view>
		</view>
		<view v-else>
			<view
				class="Wenzhang-box"
				v-for="(item, index) in tabs[currentTab].Data"
				v-if="tabs[currentTab].Data && tabs[currentTab].Data.length"
				:style="{ backgroundColor: isGray && options.WenZhangID == item.Id && !options.Type ? '#f4f5f6' : '#fff' }"
			>
				<view class="user-header">
					<image src="/static/images/company/niming.png" mode="aspectFill" class="avatar-img"></image>
					<view class="user-name">{{ item.GangweiM }}</view>
					<view>匿名用户</view>
					<image src="/static/images/company/more.png" @tap="caozuoShow(index)" mode="widthFix" style="width: 25rpx"></image>
				</view>
				<view class="wenzhang-info" :style="{ height: item.Zhankai ? 'auto' : '56rpx' }">
					<view class="wenzhang-Line-info" style="display: flex; gap: 15rpx">
						<view style="white-space: nowrap">申请渠道：{{ item.QudaoM }}</view>
						<view style="white-space: nowrap">面试进展：{{ item.MianshiJZ }}</view>
						<view style="white-space: nowrap">面试难度：{{ item.GongzuoQD }}</view>
					</view>
					<view class="wenzhang-Line-info">
						<view style="white-space: nowrap">申请地点：{{ item.ShenqingDD }}</view>
					</view>
					<view class="wenzhang-Line-info">
						<view>申请过程</view>
						<textarea name="" v-model="item.ShenqingGC" auto-height="true" disabled="true" id="" cols="30" rows="10"></textarea>
						<!-- <view>{{ item.ShenqingGC }}</view> -->
					</view>
					<view class="wenzhang-Line-info">
						<view>面试问题</view>
						<textarea name="" v-model="item.MianshiWT" auto-height="true" disabled="true" id="" cols="30" rows="10"></textarea>
						<!-- <view>{{ item.MianshiWT }}</view> -->
					</view>
					<view class="wenzhang-Line-info">
						<view>面试感受</view>
						<textarea name="" v-model="item.MianshiGS" auto-height="true" disabled="true" id="" cols="30" rows="10"></textarea>
						<!-- <view>{{ item.MianshiGS }}</view> -->
					</view>
				</view>
				<view class="wenzhang-buttom">
					<view class="wenzhang-time">{{ item.CreateTime.split(' ')[0] }}</view>
					<view class="wenzhang-right-box">
						<view class="buttom-box" @tap="Dianzan(index, item.Id, item.myDZ)">
							<image :src="item.myDZ ? '/static/images/company/hongxin.png' : '/static/images/company/xin.png'" mode=""></image>
							<view :style="{ color: item.myDZ ? '#FA1B0A' : '#666666' }">{{ item.dianzanCount || '' }}</view>
						</view>
						<view class="buttom-box" @tap="showPinglun(item.Id, index)">
							<image src="/static/images/company/pinglun.png" mode=""></image>
							<view>{{ item.pinglunCount || '' }}</view>
						</view>
						<view class="zhankai" v-if="!item.Zhankai" @tap="item.Zhankai = 1">
							<view>展开</view>
							<image src="/static/images/common/down.svg" mode=""></image>
						</view>
						<view class="zhankai" v-else @tap="item.Zhankai = 0">
							<view>收起</view>
							<image src="/static/images/common/down.svg" mode="" :style="{ transform: 'rotate(180deg)' }"></image>
						</view>
					</view>
				</view>
			</view>
			<view v-else class="no-Data">
				<image src="/static/images/my/noData.png" mode="widthFix"></image>
				<view class="">暂无数据</view>
			</view>
		</view>
	</view>

	<tui-bottom-popup :zIndex="1002" height="800" :maskZIndex="1001" :show="PinglunModel" @close="PinglunModel = false">
		<view class="popup-container">
			<view class="popup-header" style="padding: 0; border: 0">
				<view>评论列表</view>
				<view class="add-Pinglun" @tap="addPinglun">
					<tui-icon name="add-fill" color="#999" size="25" bold="true"></tui-icon>
					<view>添加评价</view>
				</view>
			</view>
		</view>
		<view v-if="tabs[currentTab].Data[CurrentIndex] && tabs[currentTab].Data[CurrentIndex].PinglunData && tabs[currentTab].Data[CurrentIndex].PinglunData.Data.length">
			<scroll-view @scrolltolower="getMorePinglun(tabs[currentTab].Data[CurrentIndex].Id, CurrentIndex)" scroll-y="true">
				<view style="height: 730rpx">
					<view class="pinglun-box" v-for="(item, index) in tabs[currentTab].Data[CurrentIndex].PinglunData.Data">
						<view
							class="pinglun-box"
							style="border-bottom: 0"
							:style="{ backgroundColor: isGray && options.PinglunID == item.Id && options.Type == 'look' ? '#f4f5f6' : '#fff' }"
						>
							<view class="left-box" @tap="userDetail(item.UserId)">
								<image :src="item.Avatar || '/static/images/company/niming.png'" class="pinglun-Avatar" mode="aspectFill"></image>
								<view style="font-size: 24rpx; color: #999999">{{ item.Name || '暂无昵称' }}</view>
							</view>
							<view style="line-height: 50rpx; margin-left: 60rpx">{{ item.PinglunNR }}</view>
							<view style="display: flex; justify-content: space-between; margin-left: 60rpx">
								<view class="wenzhang-time">{{ computeCreateTime(item.CreateTime) }}</view>
								<view class="wenzhang-right-box" style="justify-content: flex-end">
									<view class="buttom-box" @tap="PinglunZan(index, item.Id, item.myDZ, item.UserId)">
										<image :src="item.myDZ ? '/static/images/company/hongxin.png' : '/static/images/company/xin.png'" mode=""></image>
										<view :style="{ color: item.myDZ ? '#FA1B0A' : '#666666' }">{{ item.dianzanCount || '' }}</view>
									</view>
									<view class="buttom-box" @tap="reBackPinglun(item.Id, index)">
										<image src="/static/images/company/pinglun.png" mode=""></image>
										<!-- <view>{{ item.pinglunCount || '' }}</view> -->
									</view>
								</view>
							</view>
						</view>
						<view class="zPinglun-container">
							<view
								class="pinglun-box"
								style="border: 0; padding: 0"
								v-for="(val, j) in item.Pinglun"
								:style="{ backgroundColor: isGray && options.ZipingLID == val.Id && options.Type == 'lookSon' ? '#f4f5f6' : '#fff' }"
							>
								<view class="left-box" @tap="userDetail(val.UserId)">
									<image :src="val.Avatar || '/static/images/company/niming.png'" class="pinglun-Avatar" mode="aspectFill"></image>
									<view style="font-size: 24rpx; color: #999999">{{ val.Name || '暂无昵称' }}</view>
								</view>

								<view style="line-height: 50rpx; margin-left: 60rpx">
									<span v-if="(val.ZuozheID != item.ZuozheID || val.PinglunSXXID) && val.ZuoZheName">回复&nbsp;</span>
									<span style="color: #999" @tap="userDetail(val.ZuozheID)" v-if="(val.ZuozheID != item.ZuozheID || val.PinglunSXXID) && val.ZuoZheName">
										{{ val.ZuoZheName }}:
									</span>
									{{ val.PinglunNR }}
								</view>
								<view style="display: flex; justify-content: space-between; margin-left: 60rpx">
									<view class="wenzhang-time">{{ computeCreateTime(val.CreateTime) }}</view>
									<view class="wenzhang-right-box" style="justify-content: flex-end">
										<view class="buttom-box" @tap="PinglunZan(index, item.Id, val.myDZ, val.UserId, j, val.Id)">
											<image :src="val.myDZ ? '/static/images/company/hongxin.png' : '/static/images/company/xin.png'" mode=""></image>
											<view :style="{ color: val.myDZ ? '#FA1B0A' : '#666666' }">{{ val.dianzanCount || '' }}</view>
										</view>
										<view class="buttom-box" @tap="reBackPinglun(item.Id, index, j)">
											<image src="/static/images/company/pinglun.png" mode=""></image>
											<!-- <view>{{ item.pinglunCount || '' }}</view> -->
										</view>
									</view>
								</view>
							</view>
							<view
								class="Zhankai-pinglun"
								v-if="!item.noData && item.pinglunCount - 1 > 0 && item.Pinglun.length < item.pinglunCount"
								@tap="getPinglun(item.Id, index)"
							>
								----{{ item.page == 1 ? `展开${item.pinglunCount - 1}条回复` : '展开更多回复' }}
							</view>
						</view>
					</view>
				</view>
			</scroll-view>
		</view>
		<view v-else class="no-Data">
			<image src="/static/images/my/noData.png" mode="widthFix"></image>
			<view class="">暂无评论</view>
		</view>
	</tui-bottom-popup>
	<!-- 添加评论 -->
	<tui-modal :show="addPinglunModel" custom @cancel="addPinglunModel = false">
		<view class="DaShang-modal">
			<view class="tui-prompt-title">评论</view>
			<input type="text" v-model="PingjiaWZ" class="tui-input" placeholder="说点什么..." />

			<view class="submit-btn" @tap="submitPinglun">提交</view>
		</view>
	</tui-modal>
	<!-- 分享 -->
	<tui-bottom-popup :zIndex="1002" backgroundColor="#F5F5F5" :maskZIndex="1001" :show="zhuanfaShow" @close="zhuanfaModalClose">
		<view class="popup-header">
			<view>分享至</view>
			<tui-icon name="shut" @tap="zhuanfaShow = false" color="#3e3e3e" size="20" class="popup-close"></tui-icon>
		</view>
		<view class="popup-line">
			<scroll-view scroll-x="true" style="white-space: nowrap" @scrolltoupper="getFriendList">
				<view style="display: inline-flex">
					<view class="friend-box" v-for="(item, index) in friendsList.Data" @tap="shareUser(item, index)">
						<view class="friend-avatar">
							<image :src="item.Avatar || '/static/images/my/noAvatar.svg'" mode="aspectFill"></image>
							<view class="select-box" v-if="shareUserInfo.userList && shareUserInfo.userList.length">
								<tui-icon name="circle" color="#999" size="20" v-if="!item.Selected"></tui-icon>
								<tui-icon name="circle-fill" color="#FB353B" size="20" v-else></tui-icon>
							</view>
						</view>
						<view>{{ item.NAME }}</view>
					</view>
				</view>
			</scroll-view>
		</view>
		<view class="popup-line" v-if="!shareUserInfo.userList.length">
			<!-- <view class="share-box">
				<image src="/static/images/find/sixin.svg" class="share-img" mode="aspectFill"></image>
				<view>私信好友</view>
			</view> -->
			<button v-if="winInfo.uniPlatform == 'mp-weixin'" open-type="share" style="margin: 0; padding: 0; line-height: normal">
				<view class="share-box">
					<image src="/static/images/find/wechat.svg" class="share-img" mode="aspectFill"></image>
					<view>微信好友</view>
				</view>
			</button>
			<view v-else class="share-box" @tap="shareWechat">
				<image src="/static/images/find/wechat.svg" class="share-img" mode="aspectFill"></image>
				<view>微信好友</view>
			</view>
		</view>
		<view class="popup-line" style="border: 0" v-if="currentIndex >= 0 && !shareUserInfo.userList.length && tabs[currentTab].Data[currentIndex].UserId == CurrentUser.Id">
			<view class="share-box" @tap="editWenzhang">
				<view class="share-img">
					<image src="/static/images/my/editInfo.png" style="width: 30rpx" mode="widthFix"></image>
				</view>
				<view>编辑</view>
			</view>
			<view class="share-box" @tap="deleteWenzhang">
				<view class="share-img">
					<image src="/static/images/common/delete.png" style="width: 30rpx" mode="widthFix"></image>
				</view>
				<view>删除</view>
			</view>
		</view>
		<view v-if="shareUserInfo.userList.length" class="popup-line share-NR" style="border: 0">
			<textarea v-model="shareUserInfo.pinglunNR" placeholder-class="input-placeholder" placeholder="和朋友说点什么吧......"></textarea>
			<image :src="companyInfo.GongsiLOGOs" mode="aspectFill" class="biji-image"></image>
		</view>
		<view v-if="shareUserInfo.userList.length" class="fasong-btn" @tap="shareMessage">发送</view>
	</tui-bottom-popup>
</template>

<script>
export default {
	data() {
		return {
			Islogin: this.Microi.IsLogin(),
			CurrentUser: this.Microi.GetCurrentUser(),
			startTime: 0,
			isGray: false,
			companyInfo: {},
			options: {},
			winInfo: {
				height: 64, //header高度
				top: 26, //标题图标距离顶部距离
				scrollH: 0 //滚动总高度
			},
			currentTab: 0,
			PingjiaWZ: '',
			tabsName: [
				{
					name: '岗位评价'
				},
				{
					name: '面经'
				}
			],
			tabs: [
				{
					name: '岗位评价',
					tableName: 'diy_gangweipj',
					page: 1,
					noData: false,
					Data: [],
					paixuArray: [
						{
							name: '发布时间',
							sort: 0
						},
						{
							name: '评论数',
							sort: 0
						},
						{
							name: '点赞数',
							sort: 0
						},
						{
							name: '浏览量',
							sort: 0
						}
					]
				},
				{
					name: '面经',
					tableName: 'diy_MianJing',
					page: 1,
					noData: false,
					Data: [],
					paixuArray: [
						{
							name: '发布时间',
							sort: 0
						},
						{
							name: '评论数',
							sort: 0
						},
						{
							name: '点赞数',
							sort: 0
						},
						{
							name: '浏览量',
							sort: 0
						}
					]
				}
			],
			searchKey: '',
			PinglunModel: false,
			CurrentIndex: -1,
			CurrentPLindex: -1,
			CurrentPLindex2: -1,
			PinglunMode: '',
			addPinglunModel: false,
			IsDisabled: false,
			moreBtn: false,
			zhuanfaShow: false,
			shareUserInfo: {
				userList: [],
				pinglunNR: ''
			},
			friendsList: {
				page: 1,
				Data: [],
				noData: false
			},
			currentIndex: -1
		};
	},
	mounted() {
		let obj = {};
		// #ifdef MP-WEIXIN
		obj = wx.getMenuButtonBoundingClientRect();
		// #endif
		// #ifdef MP-BAIDU
		obj = swan.getMenuButtonBoundingClientRect();
		// #endif
		// #ifdef MP-ALIPAY
		my.hideAddToDesktopMenu();
		// #endif

		setTimeout(() => {
			uni.getSystemInfo({
				success: (res) => {
					this.winInfo = res;
					this.winInfo.width = obj.left || res.windowWidth;
					this.winInfo.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44;
					this.winInfo.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6;
					this.winInfo.scrollH = res.windowWidth;
					if (res.hostName != 'WeChat') {
						uni.hideTabBar();
					}
				}
			});
		}, 0);
	},

	onLoad(options) {
		this.options = options;
		if (options.ShangjiID) uni.setStorageSync('ShangjiID', options.ShangjiID);
		if (options.currentTab) this.currentTab = options.currentTab;
		this.getCompanyInfo();
	},
	onShow() {
		this.startTime = new Date();
	},
	onHide() {
		if (this.Islogin) {
			// 获取当前页面栈
			const pages = getCurrentPages();
			// 获取当前页面的对象
			const currentPage = pages[pages.length - 1];
			// 获取当前页面的路径
			const route = currentPage.route;
			// 获取当前页面的参数
			const options = currentPage.options;
			this.Microi.ApiEngine.Run('Add_liulanLog', {
				YemianCS: options,
				YemianDZ: route,
				LiulanSJC: new Date().getTime() - this.startTime.getTime()
			});
		}
	},
	onUnload() {
		if (this.Islogin) {
			// 获取当前页面栈
			const pages = getCurrentPages();
			// 获取当前页面的对象
			const currentPage = pages[pages.length - 1];
			// 获取当前页面的路径
			const route = currentPage.route;
			// 获取当前页面的参数
			const options = currentPage.options;
			this.Microi.ApiEngine.Run('Add_liulanLog', {
				YemianCS: options,
				YemianDZ: route,
				LiulanSJC: new Date().getTime() - this.startTime.getTime()
			});
		}
	},
	methods: {
		async scCompany() {
			var self = this;
			var res = await self.Microi.ApiEngine.Run('user_dianzanOrsc', {
				Id: self.options.Id,
				Caozuo: '收藏',
				Leixing: '公司',
				Type: self.companyInfo.shoucang ? 1 : 0
			});
			if (res.Code == 1) {
				self.companyInfo.shoucang = !self.companyInfo.shoucang;
			}
		},
		async deleteWenzhang() {
			var self = this;
			var tableName = this.currentTab == 0 ? 'diy_GangweiPJ' : 'diy_MianJing';
			uni.showModal({
				title: '提示',
				content: '确定删除吗',
				success: async function (res) {
					if (res.confirm) {
						var res = await self.Microi.ApiEngine.Run('delete_wenzhang', {
							Id: self.tabs[self.currentTab].Data[self.CurrentIndex].Id,
							Biaoming: tableName
						});
						if (res.Code == 1) {
							self.search();
							self.zhuanfaShow = false;
						} else {
							self.Microi.Tips('删除失败', false);
						}
					} else if (res.cancel) {
						console.log('用户点击取消');
					}
				}
			});
		},
		editWenzhang() {
			uni.navigateTo({
				url: '/pages/my/huodong/HDfabu?Id=' + this.tabs[this.currentTab].Data[this.currentIndex].Id + '&currentTab=' + this.currentTab
			});
		},
		shareUser(item, j) {
			if (item.Selected) {
				var index = this.shareUserInfo.userList.findIndex((val) => (val.YonghuID = item.YonghuID));
				if (index != -1) {
					this.shareUserInfo.userList.splice(index, 1);
				}
			} else {
				this.shareUserInfo.userList.unshift(item);
			}
			this.friendsList.Data[j].Selected = !this.friendsList.Data[j].Selected;
		},
		zhuanfaModalClose() {
			this.zhuanfaShow = false;
			this.shareUserInfo = {
				userList: [],
				pinglunNR: ''
			};
			this.currentIndex = -1;
		},
		caozuoShow(index = -1) {
			this.currentIndex = index;
			if (this.Islogin) {
				if (!this.friendsList.noData && !this.friendsList.Data.length) this.getFriendList();
				this.zhuanfaShow = true;
			} else {
				this.Microi.Tips('请先登录', false);
			}
		},
		async shareMessage() {
			var self = this;
			if (!self.shareUserInfo.userList.length) {
				this.Microi.Tips('请选择分享好友', false);
				return;
			}
			var tableName = this.currentTab == 0 ? 'diy_GangweiPJ' : 'diy_MianJing';
			if (this.currentIndex == -1) {
				tableName = 'diy_CompanyInfo';
			}
			var PinglunNR = '';
			if (self.shareUserInfo.pinglunNR) {
				PinglunNR = self.shareUserInfo.pinglunNR;
			} else if (self.currentIndex == -1) {
				PinglunNR = this.companyInfo.GongsiM;
			} else {
				PinglunNR = `${self.companyInfo.GongsiM}的${this.tabs[this.currentTab].name}`;
			}
			var res = await self.Microi.ApiEngine.Run('get_ShareUser', {
				userList: self.shareUserInfo.userList,
				PinglunNR: PinglunNR,
				Biaoming: tableName,
				Id: self.currentIndex == -1 ? this.options.Id : this.tabs[this.currentTab].Data[this.CurrentIndex].Id
			});
			if (res.Code == 1) {
				this.Microi.Tips('分享成功', false);
				this.shareUserInfo = {
					userList: [],
					pinglunNR: ''
				};
				this.currentIndex = -1;
				this.zhuanfaShow = false;
				return;
			} else {
				this.Microi.Tips(res.Msg, false);
			}
		},
		async getFriendList() {
			var self = this;
			if (this.friendsList.noData) {
				this.Microi.Tips('暂无更多好友', false);
				return;
			}
			var res = await self.Microi.ApiEngine.Run('get_myFriendList', {
				YonghuID: self.CurrentUser.Id,
				page: this.friendsList.page
			});
			if (!res.Data.length) {
				this.friendsList.noData = true;
				return;
			}
			if (this.friendsList.page == 1) {
				this.friendsList.Data = res.Data;
			} else {
				this.friendsList.Data.push(...res.Data);
			}
			this.friendsList.page++;
		},
		computeCreateTime(CreateTime) {
			var CreateTime = new Date(CreateTime).getTime();
			var TimeNow = new Date().getTime();
			var PassTime = TimeNow - CreateTime;

			var oneMinute = 60 * 1000; // 一分钟的毫秒数
			var oneHour = 60 * oneMinute; // 一小时的毫秒数
			var oneDay = 24 * oneHour; // 一天的毫秒数
			var oneMonth = 30 * oneDay; // 大约一个月的毫秒数，这里假设一个月为30天

			if (PassTime < oneMinute) {
				return '刚刚';
			} else if (PassTime < oneHour) {
				return Math.floor(PassTime / oneMinute) + '分钟前';
			} else if (PassTime < oneDay) {
				return Math.floor(PassTime / oneHour) + '小时前';
			} else if (PassTime < oneMonth) {
				return Math.floor(PassTime / oneDay) + '天前';
			} else {
				var date = new Date(CreateTime);
				return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
			}
		},
		userDetail(Id) {
			uni.navigateTo({
				url: '/pages/my/myDetail/myDetail?Id=' + Id
			});
		},
		topBubble() {
			this.moreBtn = !this.moreBtn;
		},
		reBackPinglun(Id, index, index2) {
			this.PingjiaWZ = '';
			this.addPinglunModel = true;
			this.CurrentPLindex = index;
			this.CurrentPLindex2 = index2;
			this.PinglunMode = 1;
		},
		async getCompanyInfo() {
			var self = this;
			var res = await self.Microi.ApiEngine.Run('get_CompanyInfo', {
				Id: self.options.Id
			});
			if (res.Data.IsDeleted != 0) {
				this.Microi.Tips('该公司已删除', false);
				setTimeout(function () {
					self.goBack();
				}, 1000);
			} else {
				this.companyInfo = res.Data;
				this.getDataList();
			}
		},
		async Dianzan(index, Id, Type) {
			var self = this;
			uni.showLoading({
				title: '加载中～',
				mask: true
			});
			var res = await self.Microi.ApiEngine.Run('user_dianzanOrsc', {
				Id: Id,
				Caozuo: '点赞',
				Leixing: self.tabs[self.currentTab].name,
				ZuozheID: self.tabs[self.currentTab].Data[index].UserId,
				Type: Type
			});
			this.tabs[this.currentTab].Data[index].myDZ = Type ? 0 : 1;
			this.tabs[this.currentTab].Data[index].dianzanCount = Type
				? this.tabs[this.currentTab].Data[index].dianzanCount - 1
				: this.tabs[this.currentTab].Data[index].dianzanCount + 1;
			uni.hideLoading();
		},
		async PinglunZan(index, Id, Type, ZuozheID, index2 = -1, Id2) {
			var self = this;
			uni.showLoading({
				title: '加载中～',
				mask: true
			});
			var res = await self.Microi.ApiEngine.Run('user_dianzanOrsc', {
				Id: self.tabs[self.currentTab].Data[self.CurrentIndex].Id,
				Caozuo: '点赞',
				Leixing: self.tabs[self.currentTab].name,
				ZuozheID: ZuozheID,
				Type: Type,
				PinglunID: Id,
				ZipingLID: Id2
			});
			if (index2 == -1) {
				this.tabs[this.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].myDZ = Type ? 0 : 1;
				this.tabs[this.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].dianzanCount = Type
					? this.tabs[this.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].dianzanCount - 1
					: this.tabs[this.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].dianzanCount + 1;
			} else {
				this.tabs[this.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].Pinglun[index2].myDZ = Type ? 0 : 1;
				this.tabs[this.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].Pinglun[index2].dianzanCount = Type
					? this.tabs[this.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].Pinglun[index2].dianzanCount - 1
					: this.tabs[this.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].Pinglun[index2].dianzanCount + 1;
			}
			uni.hideLoading();
		},
		addInfo() {
			uni.navigateTo({
				url: '/pages/my/huodong/HDfabu?currentTab=' + this.currentTab + '&GongsiID=' + this.options.Id
			});
		},
		addPinglun() {
			this.addPinglunModel = true;
		},
		moreGWData() {
			uni.navigateTo({
				url: '/pages/my/companyInfo/XinziList?Id=' + this.options.Id
			});
		},
		showPinglun(Id, index) {
			this.PinglunModel = true;
			this.CurrentIndex = index;
			this.getMorePinglun(Id, index);
		},
		getMorePinglun(Id, index) {
			var self = this;
			if (
				!self.tabs[self.currentTab].Data[index].PinglunData ||
				!self.tabs[self.currentTab].Data[index].PinglunData.length ||
				!self.tabs[self.currentTab].Data[index].PinglunData.noData
			) {
				self.toPinglun(Id, index);
			} else {
				self.Microi.Tips('暂无更多评论', false);
				return;
			}
		},
		async getPinglun(Id, index) {
			var self = this;
			if (
				self.tabs[self.currentTab].Data[self.CurrentIndex] &&
				self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData &&
				self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[index] &&
				self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].noData
			)
				return;

			uni.showLoading({
				title: '加载中～',
				mask: true
			});
			var page = self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].page || 1;
			var PinglunID = self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].Pinglun[0].Id || ''; //self.options.ZipingLID ||

			var res = await self.Microi.ApiEngine.Run('get_PinglunList', {
				Id: Id,
				page: page,
				YonghuID: self.CurrentUser?.Id,
				PinglunID: PinglunID,
				Type: 1
			});
			uni.hideLoading();
			if (res.Data.length == 0) {
				self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].noData = true;
			}

			if (res.Data[0].Id == PinglunID) res.Data.splice(0, 1);
			self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].Pinglun.push(...res.Data);

			self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[index].page = page + 1;
		},
		async toPinglun(Id, index) {
			var self = this;
			if (self.tabs[self.currentTab].Data[index] && self.tabs[self.currentTab].Data[index].PinglunData && self.tabs[self.currentTab].Data[index].PinglunData.noData) return;
			uni.showLoading({
				title: '加载中～',
				mask: true
			});
			self.CurrentIndex = index;
			var page = self.tabs[self.currentTab].Data[index].PinglunData ? self.tabs[self.currentTab].Data[index].PinglunData.page : 1;
			var res = await self.Microi.ApiEngine.Run('get_PinglunList', {
				Id: Id,
				page: page,
				YonghuID: self.CurrentUser?.Id,
				PinglunID: self.options.PinglunID,
				ZipingLID: self.options.ZipingLID || '',
				Type: 0
			});
			uni.hideLoading();
			if (!self.tabs[self.currentTab].Data[index].PinglunData || !self.tabs[self.currentTab].Data[index].PinglunData.page) {
				self.tabs[self.currentTab].Data[index].PinglunData = {
					Data: res.Data,
					page: 1,
					noData: false
				};
			} else {
				self.tabs[self.currentTab].Data[index].PinglunData.Data.push(...res.Data);
			}
			if (!res.Data.length) {
				self.tabs[self.currentTab].Data[index].PinglunData.noData = true;
			} else {
				self.tabs[self.currentTab].Data[index].PinglunData.page++;
			}
			if (self.tabs[self.currentTab].Data[index].PinglunData.page == 1 && self.options.PinglunID) {
				if (!res.Data.length || res.Data[0].Id != self.options.PinglunID) {
					this.Microi.Tips('该评论已删除', false);
					return;
				} else {
					self.isGray = true;
					setTimeout(() => {
						self.isGray = false;
					}, 2000);
				}
			}

			self.PinglunModel = true;
		},
		shareWechat() {
			var self = this;
			// 获取当前页面栈
			const pages = getCurrentPages();
			// 获取当前页面的对象
			const currentPage = pages[pages.length - 1];
			// 获取当前页面的路径
			const route = currentPage.route;
			var path = route + '?Id=' + this.options.Id;
			if (this.Islogin) {
				path = path + '&ShangjiID=' + this.CurrentUser.Id;
			}
			var title = this.companyInfo.GongsiM;
			if (this.currentIndex >= 0) {
				title += this.currentTab == 0 ? '的岗位评价' : '的面经';
				path = path + `&currentTab=${this.currentTab}&WenZhangID=${this.tabs[this.currentTab].Data[this.currentIndex].Id}`;
			}
			uni.share({
				provider: 'weixin',
				scene: 'WXSceneSession',
				type: 5,
				title: title,
				imageUrl: this.companyInfo.GongsiLOGO
					? this.Microi.FileServer + this.companyInfo.GongsiLOGO
					: 'https://minio.nbweixin.cn/public/baiying/img/20250506/byingLOGO_3x.png',
				miniProgram: {
					id: 'gh_b4436e0c5cb3',
					path: path,
					type: 2,
					webUrl: this.Microi.Weburl
				},
				success: function (res) {
					console.log('success:' + JSON.stringify(res));
				},
				fail: function (err) {
					console.log('fail:' + JSON.stringify(err));
				}
			});
		},
		search() {
			this.tabs[this.currentTab].page = 1;
			this.tabs[this.currentTab].noData = false;
			this.tabs[this.currentTab].Data = [];
			this.getDataList();
		},
		// 提价评论
		async submitPinglun() {
			var self = this;
			uni.showLoading({
				title: '提交中~',
				mask: true
			});
			if (self.IsDisabled) {
				this.Microi.Tips('请勿重复点击', false);
				uni.hideLoading();
				return;
			}
			self.IsDisabled = true;
			if (!self.PingjiaWZ) {
				this.Microi.Tips('请输入评价内容', false);
				uni.hideLoading();
				self.IsDisabled = false;
				return;
			}
			var PinglunXXID = '';
			var ZuozheID = self.tabs[self.currentTab].Data[self.CurrentIndex].UserId;
			var PinglunID = self.tabs[self.currentTab].Data[self.CurrentIndex].Id;
			var HuifuPL = 0;
			var ZuoZheName = '';
			var PinglunSXXID = '';
			if (self.CurrentPLindex >= 0) {
				// PinglunID = self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[self.CurrentPLindex].Id;
				PinglunXXID = self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[self.CurrentPLindex].Id;
				ZuozheID = self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[self.CurrentPLindex].UserId;
				if (self.CurrentPLindex2 >= 0) {
					PinglunSXXID = self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[self.CurrentPLindex].Pinglun[self.CurrentPLindex2].Id;
					HuifuPL = 1;
					ZuoZheName = self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[self.CurrentPLindex].Pinglun[self.CurrentPLindex2].Name;
					ZuozheID = self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[self.CurrentPLindex].Pinglun[self.CurrentPLindex2].UserId;
				}
			}
			var res = await self.Microi.FormEngine.AddFormData({
				FormEngineKey: 'diy_Pingluninfo',
				_RowModel: {
					PinglunID: PinglunID,
					PinglunNR: self.PingjiaWZ,
					PinglunXXID: PinglunXXID,
					Leixing: self.tabs[self.currentTab].name,
					ZuozheID: ZuozheID,
					PinglunSXXID: PinglunSXXID
				}
			});
			uni.hideLoading();
			self.IsDisabled = true;
			if (res.Code == 1) {
				self.PingjiaWZ = '';
				self.addPinglunModel = false;
				res.Data.Avatar = self.CurrentUser.Avatar;
				res.Data.Name = self.CurrentUser.Name;
				res.Data.ZuoZheName = ZuoZheName;

				console.log(res.Data, 'Data');
				if (self.CurrentPLindex >= 0) {
					self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data[self.CurrentPLindex].Pinglun.unshift(res.Data);
				} else {
					self.tabs[self.currentTab].Data[self.CurrentIndex].PinglunData.Data.unshift(res.Data);
				}
			} else {
				this.Microi.Tips('评论添加失败', false);
			}
			self.IsDisabled = false;
			self.CurrentPLindex = -1;
			self.CurrentPLindex2 = -1;
		},
		// 排序切换
		changePaixu(index) {
			this.tabs[this.currentTab].page = 1;
			this.tabs[this.currentTab].noData = false;
			this.tabs[this.currentTab].Data = [];
			this.tabs[this.currentTab].paixuArray.forEach((item, i) => {
				if (i != index) {
					item.sort = 0;
				}
			});
			if (this.tabs[this.currentTab].paixuArray[index].sort < 2) {
				this.tabs[this.currentTab].paixuArray[index].sort++;
				this.getDataList();
			} else {
				this.tabs[this.currentTab].paixuArray[index].sort = 1;
				this.getDataList();
			}
		},
		//  获取列表数据
		async getDataList() {
			uni.showLoading({
				title: '加载中',
				mask: true
			});
			var self = this;
			var flag = true;
			var res = await self.Microi.ApiEngine.Run('get_GP_MJ_List', {
				Id: self.options.Id,
				WenZhangID: self.options.WenZhangID,
				YonghuID: self.CurrentUser?.Id,
				TableName: self.tabs[self.currentTab].tableName,
				page: self.tabs[self.currentTab].page,
				searchKey: self.searchKey || '',
				paixuArray: self.tabs[this.currentTab].paixuArray
			});
			if (!res.Data.length) self.tabs[self.currentTab].noData = true;
			if (self.tabs[self.currentTab].page == 1) {
				self.tabs[self.currentTab].Data = res.Data;
				if (self.options.WenZhangID && !self.options.Type) {
					if (res.Data[0].Id != self.options.WenZhangID) {
						this.Microi.Tips('该文章已删除', false);
						flag = false;
					} else {
						this.isGray = true;
						setTimeout(() => {
							this.isGray = false;
						}, 2000);
					}
				}
			} else {
				self.tabs[self.currentTab].Data.push(...res.Data);
			}
			uni.hideLoading();
			self.tabs[self.currentTab].page++;
			console.log(flag, 'falg');
			if (flag && self.options.Type && self.currentTab == self.options.currentTab && self.tabs[self.currentTab].Data[0].Id == self.options.WenZhangID) {
				self.showPinglun(self.tabs[self.currentTab].Data[0].Id, 0);
			} else if (res.Data.length && self.options.WenZhangID && res.Data[0].Id != self.options.WenZhangID) {
				this.Microi.Tips('该文章已删除', false);
			}
		},
		changeTab(e) {
			this.currentTab = e.index;
			if (!this.tabs[this.currentTab].Data.length && this.tabs[this.currentTab].noData == false) {
				this.getDataList();
			}
		},
		previewImage(url) {
			if (url) {
				uni.previewImage({
					urls: [url],
					current: 0
				});
			}
		},
		goBack() {
			if (this.backUrl) {
				uni.reLaunch({
					url: `/pages${this.backUrl}`
				});
			} else {
				let pages = getCurrentPages(); // 获取当前页面堆栈
				let pageCount = pages.length; // 页面堆栈中的页面数量
				// 判断是否有上级页面
				if (pageCount > 1) {
					// 如果有上级页面，则返回上级页面

					uni.navigateBack({
						delta: 1
					});
				} else {
					// 如果没有上级页面，则返回首页
					uni.switchTab({
						url: '/pages/tabbar/find/find' // 替换为你的首页路径
					});
				}
			}
		},
		getMoreData() {
			if (!this.tabs[this.currentTab].noData) {
				this.getDataList();
			} else {
				this.Microi.Tips('暂无更多数据', false);
			}
		}
	},
	onReachBottom() {
		this.getMoreData();
	},
	onPullDownRefresh() {
		this.tabs = [
			{
				name: '岗位评价',
				tableName: 'diy_gangweipj',
				page: 1,
				noData: false,
				Data: [],
				paixuArray: [
					{
						name: '发布时间',
						sort: 0
					},
					{
						name: '评论数',
						sort: 0
					},
					{
						name: '点赞数',
						sort: 0
					}
				]
			},
			{
				name: '面经',
				tableName: 'diy_MianJing',
				page: 1,
				noData: false,
				Data: [],
				paixuArray: [
					{
						name: '发布时间',
						sort: 0
					},
					{
						name: '评论数',
						sort: 0
					},
					{
						name: '点赞数',
						sort: 0
					}
				]
			}
		];
		this.getCompanyInfo();

		setTimeout(function () {
			uni.stopPullDownRefresh();
		}, 500);
	},
	/**
	 * 用户点击右上角分享
	 */
	onShareAppMessage: function (options) {
		var self = this;
		// 获取当前页面栈
		const pages = getCurrentPages();
		// 获取当前页面的对象
		const currentPage = pages[pages.length - 1];
		// 获取当前页面的路径
		const route = currentPage.route;
		var path = route + '?Id=' + this.options.Id;
		if (this.Islogin) {
			path = path + '&ShangjiID=' + this.CurrentUser.Id;
		}
		var title = this.companyInfo.GongsiM;
		if (this.currentIndex >= 0) {
			title += this.currentTab == 0 ? '的岗位评价' : '的面经';
			path = path + `&currentTab=${this.currentTab}&WenZhangID=${this.tabs[this.currentTab].Data[this.currentIndex].Id}`;
		}
		return {
			title: title,
			path: path,
			imageUrl: this.Microi.FileServer + this.companyInfo.GongsiLOGO,
			success: function (res) {
				if (self.currentIndex >= 0) {
					self.Microi.ApiEngine.Run('zhuanfa_Wenzhang', {
						Biaoming: self.currentTab == 0 ? 'diy_GangweiPJ' : 'diy_MianJing',
						Id: self.options.Id
					});
				}
			}
		};
	},
	onShareTimeline: function () {
		var self = this;
		var query = {
			Id: this.options.Id,
			ShangjiID: this.CurrentUser?.Id
		};
		var title = this.companyInfo.GongsiM;
		if (this.currentIndex >= 0) {
			title = this.companyInfo.GongsiM + this.currentTab == 0 ? '的岗位评价' : '的面经';
			query.currentTab = this.currentTab;
			query.WenZhangID = this.tabs[this.currentTab].Data[this.currentIndex].Id;
			// path = path + `&currentTab=${this.currentTab}&WenZhangID=${this.tabs[this.currentTab].Data[this.currentIndex].Id}`;
		}
		return {
			title: title,
			query: query,
			imageUrl: this.Microi.FileServer + this.companyInfo.GongsiLOGO,
			success: function (res) {
				if (self.currentIndex >= 0) {
					self.Microi.ApiEngine.Run('zhuanfa_Wenzhang', {
						Biaoming: self.currentTab == 0 ? 'diy_GangweiPJ' : 'diy_MianJing',
						Id: self.options.Id
					});
				}
			}
		};
	}
};
</script>

<style>
page {
	background-color: #fff;
}
.container {
	background: #fff;
	padding: 175rpx 20rpx 150rpx 20rpx;
	color: #000;
	box-sizing: border-box;
}

.header-box {
	width: 100%;
	position: fixed;
	left: 0;
	top: 0;
	z-index: 999;
	background-color: #fff;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	box-sizing: border-box;
	gap: 10rpx;
}
.header-name {
	font-weight: 800;
	font-size: 36rpx;
	color: #212121;
	line-height: 42rpx;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.header-info {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 20rpx;
}
.header-btn {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 20rpx;
	background-color: #fff;
	position: relative;
}
.header-btn-box {
	/* width: 188rpx; */
	height: 40rpx;
	font-family: PingFang SC, PingFang SC;
	font-weight: 500;
	font-size: 28rpx;
	color: #999999;
	text-align: left;
	font-style: normal;
	text-transform: none;
	/* padding: 16rpx; */
}
.header-btn image {
	width: 44rpx;
	height: 44rpx;
}

.hearder-container {
	padding: 20rpx 0;
	border-bottom: 2rpx solid #f4f5f6;
}
.company-info {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 20rpx;
}
.company-image {
	width: 160rpx;
	height: 160rpx;
	border-radius: 20rpx;
}
.no-GongSiLogo {
	width: 160rpx;
	height: 160rpx;
	background-color: #FB353B;
	border-radius: 20rpx;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	font-family: PingFang SC, PingFang SC;
	font-weight: bold;
	font-size: 32rpx;
	color: #ffffff;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.company-title {
	width: 506rpx;
	display: flex;
	justify-content: space-between;
	gap: 10rpx;
	flex-direction: column;
}
.company-name {
	font-weight: 800;
	font-size: 32rpx;
	color: #212121;
	line-height: 38rpx;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.company-MS {
	width: 506rpx;
	font-weight: 400;
	font-size: 24rpx;
	color: #666666;
	line-height: 28rpx;
	text-align: left;
	font-style: normal;
	text-transform: none;

	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	word-wrap: break-word;
}

.zhankai {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 5rpx;

	font-family: PingFang SC, PingFang SC;
	font-size: 24rpx;
	color: #999999;
	text-align: left;
	font-style: normal;
	text-transform: none;
	line-height: 24rpx;
}
.zhankai image {
	width: 18rpx;
	height: 10rpx;
	margin: auto 0;
}
.company-BQcontainer {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 10rpx;
}
.company-BQ {
	width: 140rpx;
	height: 40rpx;
	background: #eef0f1;
	border-radius: 8rpx 8rpx 8rpx 8rpx;

	font-weight: 400;
	font-size: 24rpx;
	color: #666666;
	line-height: 40rpx;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.count-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 30rpx 60rpx;
	box-sizing: border-box;
}
.count-box {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;

	font-weight: 800;
	font-size: 40rpx;
	color: #333333;
	line-height: 47rpx;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.count-title {
	font-weight: 400;
	font-size: 24rpx;
	color: #666666;
	line-height: 28rpx;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.Xinzi-container {
	margin-top: 50rpx;
}
.Xinzi-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.xinzi-title {
	font-family: PingFang SC, PingFang SC;
	font-weight: 800;
	font-size: 32rpx;
	color: #333333;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.right-box {
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #999999;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.xinziInfo-container {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10rpx;
	margin-top: 20rpx;
}
.xinzi-box {
	padding: 20rpx;
	width: 348rpx;
	/* height: 168rpx; */
	background: #f4f5f6;
	border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.xinzi-BT {
	font-family: PingFang SC, PingFang SC;
	font-weight: 800;
	font-size: 28rpx;
	color: #333333;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.xinziinfo-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.Line-info {
	font-family: PingFang SC, PingFang SC;
	font-weight: 500;
	font-size: 24rpx;
	color: #333333;
	text-align: left;
	font-style: normal;
	text-transform: none;
	line-height: 40rpx;
}
.search-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20rpx;
	margin: 20rpx 0;
}
.search-box {
	width: 590rpx;
	height: 68rpx;
	background: #f4f5f6;
	border-radius: 20rpx 20rpx 20rpx 20rpx;
	padding: 15rpx;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	box-sizing: border-box;
	gap: 10rpx;
}
.search-box image {
	width: 34rpx;
	height: 34rpx;
}
.search-holder {
	/* 
	width: 166rpx;
	height: 40rpx; */
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #999999;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.search-btn {
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 32rpx;
	color: #666666;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.paixu-Container {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 16rpx;
	margin: 20rpx;
}
.paixu-box {
	display: flex;
	align-items: center;
	justify-content: flex-start;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 25rpx;
	color: #666666;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.paixu-box image {
	width: 25rpx;
}
.Wenzhang-box {
	width: 692rpx;
	/* height: 560rpx; */
	border-radius: 16rpx 16rpx 16rpx 16rpx;
	border: 2rpx solid #f4f5f6;
	padding: 20rpx;
	margin: 15rpx;
	box-sizing: border-box;
	background-color: #fff;
}
.user-header {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 15rpx;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 24rpx;
	color: #999999;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.avatar-img {
	width: 60rpx;
	height: 60rpx;
}

.user-name {
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 32rpx;
	color: #333333;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.wenzhang-right-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15rpx;
}
.wenzhang-info {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	/* -webkit-line-clamp: 8; */
	overflow: hidden;
	text-overflow: ellipsis;
	word-wrap: break-word;
	height: 56rpx;
}
.wenzhang-Line-info {
	margin: 15rpx 0;
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #333333;
	font-style: normal;
	text-transform: none;
}
.wenzhang-buttom {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.wenzhang-time {
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 24rpx;
	color: #999999;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.buttom-box {
	display: flex;
	align-items: center;
	justify-content: flex-start;

	gap: 10rpx;
	height: 34rpx;
	font-family: Inter, Inter;
	font-weight: 400;
	font-size: 28rpx;
	color: #666666;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.buttom-box image {
	width: 36rpx;
	height: 36rpx;
}
.zPinglun-container {
	margin: 16rpx;
	margin-bottom: 0;
	margin-left: 60rpx;
}
.Zhankai-pinglun {
	color: #FB353B;
	font-size: 25rpx;
}
.no-Data {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	font-size: 25rpx;
	color: #999999;
	margin: auto;
	margin-top: 200rpx;
}
.no-Data image {
	/* width: 200rpx; */
}
.add-Pinglun {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 196rpx;
	height: 60rpx;
	background: #f4f5f6;
	border-radius: 30rpx 30rpx 30rpx 30rpx;
	gap: 12rpx;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #666666;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.add-Pinglun image {
	width: 36rpx;
	height: 36rpx;
}
.popup-container {
	padding: 20rpx;
}
.popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.tui-input_box {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20rpx;
	font-size: 25rpx;
}
.tui-input_box textarea {
	background-color: #f2f2f2;
	border-radius: 16rpx;
	padding: 16rpx;
	height: 150rpx;
	width: 90%;
	box-sizing: border-box;
	margin-top: 16rpx;
}
.tui-input_box input {
	padding: 15rpx;
	border-radius: 20rpx;
	text-align: left;
}
.tui-input_title {
	width: 250rpx;
	display: flex;
	align-items: center;
	justify-content: flex-start;
}
.tui-input_info {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}
.tui-Btn-box_refuse {
	width: 276rpx;
	height: 72rpx;
	background: #FB353B;
	border-radius: 98rpx 98rpx 98rpx 98rpx;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 800; */
	font-size: 32rpx;
	color: #ffffff;
	text-align: center;
	font-style: normal;
	line-height: 72rpx;
	text-transform: none;
	margin: auto;
}
.pinglun-box {
	margin: 16rpx;
	margin-bottom: 0;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #333333;
	font-style: normal;
	text-transform: none;
	padding: 16rpx;
	box-sizing: border-box;
	background-color: #fff;
	border-bottom: 1rpx solid #f2f2f2;
}
.pinglun-Avatar {
	width: 60rpx;
	height: 60rpx;
	border-radius: 50%;
}
.center {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-direction: column;
}
.left-box {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 15rpx;
}
.DaShang-modal {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

.tui-prompt-title {
	padding-bottom: 20rpx;
	font-size: 34rpx;
}

.tui-input {
	margin: 30rpx 40rpx;
	border-bottom: 1rpx solid #e6e6e6;
	padding-bottom: 20rpx;
	font-size: 32rpx;
}
.submit-btn {
	width: 90%;
	margin: auto;
	height: 80rpx;
	line-height: 80rpx;
	text-align: center;
	background-color: #faa9a7;
	color: #fff;
	border-radius: 40rpx;
}

.popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16rpx;
	border-bottom: 1rpx solid #ececec;
}

.popup-title {
	font-size: 32rpx;
	font-weight: bold;
}

.popup-close {
	font-size: 40rpx;
	color: #a6a6a6;
	padding: 10rpx;
}
.popup-line {
	padding: 16rpx;
	border-bottom: 1rpx solid #ececec;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 20rpx;
}
.input-placeholder {
	font-family: PingFang SC, PingFang SC;
	font-size: 22rpx;
	color: #ccc;
	text-align: left;
}
.friend-box {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 10rpx;
	position: relative;
	font-family: PingFang SC, PingFang SC;
	font-size: 22rpx;
	color: #000;
	text-align: left;
	font-style: normal;
	margin-right: 10rpx;
}

.friend-avatar {
	width: 80rpx;
	height: 80rpx;

	position: relative;
}
.friend-avatar image {
	width: 100%;
	height: 100%;
	border-radius: 50%;
}
.select-box {
	position: absolute;
	bottom: -2%;
	right: -2%;
	width: 30rpx;
	height: 30rpx;
	background-color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.share-box {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 10rpx;

	font-family: PingFang SC, PingFang SC;
	font-size: 22rpx;
	color: #a6a6a6;
	text-align: left;
	font-style: normal;
	overflow: hidden;
	text-overflow: ellipsis;
	word-wrap: break-word;
}
.share-img {
	width: 80rpx;
	height: 80rpx;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #fff;
}
.share-NR {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}
.share-NR textarea {
	height: 100rpx;
	font-size: 22rpx;
	line-height: 40rpx;
}
.bottom-bgc {
	position: absolute;
	bottom: 5%;
	right: 5%;

	width: 50rpx;
	height: 20rpx;
	background-color: #dac8e9;
}
.fasong-btn {
	width: 90%;
	margin: auto;
	height: 60rpx;
	line-height: 60rpx;
	background-color: #FB353B;
	color: #fff;
	text-align: center;
	border-radius: 60rpx;
}
.biji-image {
	width: 100rpx;
	height: 100rpx;
	background-color: #fff;
}
/* video {
	width: 100rpx;
	height: 100rpx;
} */
.play-btn {
	position: absolute;
	top: 22rpx;
	right: 22rpx;
	width: 48rpx;
	height: 48rpx;
	border-radius: 50%;
	z-index: 990;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.1);
}
</style>
